package com.xnyzc.lhy.didi.feign.finance;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.didi.feign.fallback.finance.OaDFreezeServiceFallback;
import com.xnyzc.lhy.finance.entity.bill.OaDBill;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

@FeignClient(name = "${feign.applicationName.finance}", fallback = OaDFreezeServiceFallback.class)
public interface IOaDFreezeService {

    @PostMapping("/finance/oa-dfreeze/updateFreezeBalance")
    Rv updateFreezeBalance(
            @RequestParam("orderNo") String orderNo,
            @RequestParam("driverId") Long driverId,
            @RequestParam("amount") BigDecimal updateAmount
    );

    /**
     * 添加账单记录
     * @param oaDBill 账单详情
     * @return
     */
    @PostMapping("/finance/oa-dbill/saveDriverBill")
    public Rv saveDriverBill(@RequestBody OaDBill oaDBill);
}
